﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tulde.Windows.Music.ViewModel;
using System.Net;

namespace Tulde.Windows.Music
{
    /// <summary>
    /// Defines the contract for interacting with a music service asynchronously.
    /// </summary>
    public interface IMusicService
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="credentials"></param>
        /// <param name="callback"></param>
        void Authenticate(ICredentials credentials, Action<AuthenticationToken> callback);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="callback"></param>
        void EnumerateArtists(Action<ArtistCollection> callback);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="callback"></param>
        void EnumerateAlbums(Action<AlbumCollection> callback);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="callback"></param>
        void EnumerateTracks(Action<TrackCollection> callback);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="callback"></param>
        void EnumeratePlaylists(Action<PlaylistCollection> callback);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="pattern"></param>
        /// <param name="callback"></param>
        void SearchArtists(string pattern, Action<SearchResults> callback);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="pattern"></param>
        /// <param name="callback"></param>
        void SearchAlbums(string pattern, Action<SearchResults> callback);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="pattern"></param>
        /// <param name="callback"></param>
        void SearchTracks(string pattern, Action<SearchResults> callback);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="artist"></param>
        /// <param name="callback"></param>
        void GetArtistAlbums(Artist artist, Action<AlbumCollection> callback);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="album"></param>
        /// <param name="callback"></param>
        void GetAlbumTracks(Album album, Action<TrackCollection> callback);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="album"></param>
        /// <param name="callback"></param>
        void GetPlaylist(Playlist playlist, Action<TrackCollection> callback);

       

    }
}
